
import request from '@/utils/request';
import { Result } from './definitions/Result';
import { ShopRule } from './definitions/ShopRule';
import { ResultListShopRule } from './definitions/ResultListShopRule';
import { ResultIPageShopRule } from './definitions/ResultIPageShopRule';
import { ResultPositionShopChart } from './definitions/ResultPositionShopChart';
import { ResultIPageRuleShopChart } from './definitions/ResultIPageRuleShopChart';
import { ResultListRuleYearChart } from './definitions/ResultListRuleYearChart';
import { ResultShopRule } from './definitions/ResultShopRule';


export class ShopRuleAdminController {

    static insertUsingPOSTPath: string = "/v1/admin/shopRule";
    /// insert
    async insertUsingPOST(data: ShopRule, headers?: any):  Promise<any> {
      return request(`/v1/admin/shopRule`, {
        method: "POST",
        data: JSON.stringify(data) ,
        headers: headers,
      }) as Promise<any>;
    }
    
    static updateUsingPUTPath: string = "/v1/admin/shopRule";
    /// update
    async updateUsingPUT(data: ShopRule, headers?: any):  Promise<any> {
      return request(`/v1/admin/shopRule`, {
        method: "PUT",
        data: JSON.stringify(data) ,
        headers: headers,
      }) as Promise<any>;
    }
    
    static allUsingPOSTPath: string = "/v1/admin/shopRule/all";
    /// all
    async allUsingPOST( headers?: any):  Promise<ResultListShopRule> {
      return request(`/v1/admin/shopRule/all`, {
        method: "POST",
        data: null ,
        headers: headers,
      }) as Promise<any>;
    }
    
    static pageUsingPOSTPath: string = "/v1/admin/shopRule/page";
    /// page
    async pageUsingPOST(data: ShopRule, headers?: any):  Promise<ResultIPageShopRule> {
      return request(`/v1/admin/shopRule/page`, {
        method: "POST",
        data: JSON.stringify(data) ,
        headers: headers,
      }) as Promise<any>;
    }
    
    static positionShopUsingGETPath: string = "/v1/admin/shopRule/positionShop";

    async positionShopUsingGET( headers?: any) : Promise<ResultPositionShopChart> {
      return request(`/v1/admin/shopRule/positionShop`, {
        method: "GET",
        headers: headers,
      }) as Promise<any>;
    }
    
    static ruleShopChartUsingPOSTPath: string = "/v1/admin/shopRule/ruleShopChart";
    /// ruleShopChart
    async ruleShopChartUsingPOST(data: ShopRule, headers?: any):  Promise<ResultIPageRuleShopChart> {
      return request(`/v1/admin/shopRule/ruleShopChart`, {
        method: "POST",
        data: JSON.stringify(data) ,
        headers: headers,
      }) as Promise<any>;
    }
    
    static ruleYearChartUsingGETPath: string = "/v1/admin/shopRule/ruleYearChart";

    async ruleYearChartUsingGET( headers?: any) : Promise<ResultListRuleYearChart> {
      return request(`/v1/admin/shopRule/ruleYearChart`, {
        method: "GET",
        headers: headers,
      }) as Promise<any>;
    }
    
    static getUsingGETPath: string = "/v1/admin/shopRule/{id}";

    async getUsingGET(id: string,  headers?: any) : Promise<ResultShopRule> {
      return request(`/v1/admin/shopRule/${id}`, {
        method: "GET",
        headers: headers,
      }) as Promise<any>;
    }
    
    static deleteUsingDELETEPath: string = "/v1/admin/shopRule/{id}";

    async deleteUsingDELETE(id: string,  headers?: any) : Promise<any> {
      return request(`/v1/admin/shopRule/${id}`, {
        method: "DELETE",
        headers: headers,
      }) as Promise<any>;
    }
    
}